//
//  CNPlayer.m
//  chuiniu
//
//  Created by zheng ji on 14-9-21.
//  Copyright (c) 2014年 jxw. All rights reserved.
//

#import "CNPlayer.h"

@implementation CNPlayer
- (id) initWithCoder: (NSCoder *)coder
{
    if (self = [super init])
    {
        self.playerID = [coder decodeObjectForKey:@"playerID"];
        self.playerName = [coder decodeObjectForKey:@"playerName"];
        self.coins = [coder decodeObjectForKey:@"coins"];
        self.levelName = [coder decodeObjectForKey:@"levelName"];
    }
    return self;
}
- (void) encodeWithCoder: (NSCoder *)coder
{
    [coder encodeObject:_playerID forKey:@"playerID"];
    [coder encodeObject:_playerName forKey:@"playerName"];
    
    [coder encodeObject:_coins forKey:@"coins"];
    [coder encodeObject:_levelName forKey:@"levelName"];
}
@end
